﻿using System;

namespace ConsoleApp40
{
    class Program
    {
        static void Main(string[] args)
        {
            int[][] md = new int[6][];
            int[][] md1 = new int[6][];
            md[0] = new int[6] { 1, 0, 1, 0, 1, 1 };
            md[1] = new int[6] { 1, 1, 1, 1, 0, 0 };
            md[2] = new int[6] { 0, 1, 0, 1, 1, 1 };
            md[3] = new int[6] { 1, 1, 1, 1, 1, 1 };
            md[4] = new int[6] { 0, 1, 1, 0, 1, 0 };
            md[5] = new int[6] { 1, 0, 0, 0, 0, 1 };

            for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    Console.Write($"{md[i][j]} ");
                }
                Console.WriteLine();
            }

            Random hang = new Random();
            int thang = hang.Next(0, 5);
            Random lie = new Random();
            int tlie = lie.Next(0, 5);
            Console.WriteLine();
            Console.WriteLine("随机行数" + (thang + 1));
            Console.WriteLine("随机列数" + (tlie + 1));
            Console.WriteLine();

            if (md[thang][tlie] == 0)
            {
                md[thang][tlie] = 1;
            }
            else
            {
                md[thang][tlie] = 0;
            }

            for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    Console.Write($"{md[i][j]} ");
                }
                Console.WriteLine();
            }


            Console.ReadKey();
        }
    }
}
